

<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
  <meta charset="utf-8" />
  <meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  
  <title>MDS Quiesce Protocol &mdash; Ceph Documentation</title>
  

  
  <link rel="stylesheet" href="../../../_static/ceph.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/ceph.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/graphviz.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/css/custom.css" type="text/css" />

  
  

  
  

  

  
  <!--[if lt IE 9]>
    <script src="../../../_static/js/html5shiv.min.js"></script>
  <![endif]-->
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></script>
        <script src="../../../_static/jquery.js"></script>
        <script src="../../../_static/_sphinx_javascript_frameworks_compat.js"></script>
        <script data-url_root="../../../" id="documentation_options" src="../../../_static/documentation_options.js"></script>
        <script src="../../../_static/doctools.js"></script>
        <script src="../../../_static/sphinx_highlight.js"></script>
    
    <script type="text/javascript" src="../../../_static/js/theme.js"></script>

    
    <link rel="index" title="Index" href="../../../genindex/" />
    <link rel="search" title="Search" href="../../../search/" />
    <link rel="next" title="RADOS 网关开发者文档" href="../../radosgw/" />
    <link rel="prev" title="Ceph MDS Locker" href="../locking/" /> 
</head>

<body class="wy-body-for-nav">

   
  <header class="top-bar">
    <div role="navigation" aria-label="Page navigation">
  <ul class="wy-breadcrumbs">
      <li><a href="../../../" class="icon icon-home" aria-label="Home"></a></li>
          <li class="breadcrumb-item"><a href="../../internals/">Ceph 内幕</a></li>
          <li class="breadcrumb-item"><a href="../">MDS 开发者文档</a></li>
      <li class="breadcrumb-item active">MDS Quiesce Protocol</li>
      <li class="wy-breadcrumbs-aside">
            <a href="../../../_sources/dev/mds_internals/quiesce.rst.txt" rel="nofollow"> View page source</a>
      </li>
  </ul>
  <hr/>
</div>
  </header>
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search"  style="background: #eee" >
          

          
            <a href="../../../" class="icon icon-home"> Ceph
          

          
          </a>

          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../../../search/" method="get">
    <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        
        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../start/">Ceph 简介</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../install/">安装 Ceph</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../cephadm/">Cephadm</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../rados/">Ceph 存储集群</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../cephfs/">Ceph 文件系统</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../rbd/">Ceph 块设备</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../radosgw/">Ceph 对象网关</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mgr/">Ceph 管理器守护进程</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mgr/dashboard/">Ceph 仪表盘</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../monitoring/">监控概览</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../api/">API 文档</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../architecture/">体系结构</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../developer_guide/">开发者指南</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../internals/">Ceph 内幕</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../balancer-design/">Ceph 如何均衡（读写、容量）</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../blkin/">Tracing Ceph With LTTng</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../blkin/#tracing-ceph-with-blkin">Tracing Ceph With Blkin</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../bluestore/">BlueStore Internals</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../ceph_krb_auth/">如何配置好 Ceph Kerberos 认证的详细文档</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../cephfs-mirroring/">CephFS Mirroring</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../cephfs-reclaim/">CephFS Reclaim Interface</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../cephfs-snapshots/">CephFS 快照</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../cephx/">Cephx</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../cephx_protocol/">Cephx 认证协议详细阐述</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../config/">配置管理系统</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../config-key/">config-key layout</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../context/">CephContext</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../continuous-integration/">Continuous Integration Architecture</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../corpus/">资料库结构</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../cpu-profiler/">Oprofile 的安装</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../crush-msr/">CRUSH MSR (Multi-step Retry)</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../cxx/">C++17 and libstdc++ ABI</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../deduplication/">去重</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../delayed-delete/">CephFS delayed deletion</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../dev_cluster_deployment/">开发集群的部署</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../dev_cluster_deployment/#id5">在同一机器上部署多套开发集群</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../development-workflow/">开发流程</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../documenting/">为 Ceph 写作文档</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../dpdk/">Ceph messenger DPDKStack</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../encoding/">序列化（编码、解码）</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../erasure-coded-pool/">纠删码存储池</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../file-striping/">File striping</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../freebsd/">FreeBSD Implementation details</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../generatedocs/">Ceph 文档的构建</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../health-reports/">Health Reports</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../iana/">IANA 号</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../kclient/">Testing changes to the Linux Kernel CephFS driver</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../kclient/#step-one-build-the-kernel">Step One: build the kernel</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../kclient/#step-two-create-a-vm">Step Two: create a VM</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../kclient/#step-three-networking-the-vm">Step Three: Networking the VM</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../kubernetes/">Hacking on Ceph in Kubernetes with Rook</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../libcephfs_proxy/">Design of the libcephfs proxy</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../libs/">库体系结构</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../logging/">集群日志的用法</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../logs/">调试日志</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../macos/">在 MacOS 上构建</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../mempool_accounting/">What is a mempool?</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../mempool_accounting/#some-common-mempools-that-we-can-track">Some common mempools that we can track</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../messenger/">Messenger notes</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../mon-bootstrap/">Monitor bootstrap</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../mon-elections/">Monitor Elections</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../mon-on-disk-formats/">ON-DISK FORMAT</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../mon-osdmap-prune/">FULL OSDMAP VERSION PRUNING</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../msgr2/">msgr2 协议（ msgr2.0 和 msgr2.1 ）</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../network-encoding/">Network Encoding</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../network-protocol/">网络协议</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../object-store/">对象存储架构概述</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../osd-class-path/">OSD class path issues</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../peering/">互联</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../perf/">Using perf</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../perf_counters/">性能计数器</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../perf_histograms/">Perf histograms</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../placement-group/">PG （归置组）说明</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../quick_guide/">开发者指南（快速）</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../rados-client-protocol/">RADOS 客户端协议</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../rbd-diff/">RBD 增量备份</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../rbd-export/">RBD Export &amp; Import</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../rbd-layering/">RBD Layering</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../release-checklists/">Release checklists</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../release-process/">Ceph Release Process</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../seastore/">SeaStore</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../sepia/">Sepia 社区测试实验室</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../session_authentication/">Session Authentication for the Cephx Protocol</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../testing/">测试笔记</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../versions/">Public OSD Version</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../vstart-ganesha/">NFS CephFS-RGW Developer Guide</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../wireshark/">Wireshark Dissector</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../zoned-storage/">Zoned Storage Support</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../osd_internals/">OSD 开发者文档</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../">MDS 开发者文档</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../data-structures/">MDS 内部数据结构</a></li>
<li class="toctree-l3"><a class="reference internal" href="../exports/">Subtree exports</a></li>
<li class="toctree-l3"><a class="reference internal" href="../locking/">Ceph MDS Locker</a></li>
<li class="toctree-l3 current"><a class="current reference internal" href="#">MDS Quiesce Protocol</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#mechanism">Mechanism</a></li>
<li class="toctree-l4"><a class="reference internal" href="#inode-quiescelock">Inode Quiescelock</a></li>
<li class="toctree-l4"><a class="reference internal" href="#lookups-and-exports">Lookups and Exports</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../radosgw/">RADOS 网关开发者文档</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../ceph-volume/">ceph-volume 开发者文档</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../crimson/">Crimson developer documentation</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../governance/">项目管理</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../foundation/">Ceph 基金会</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../ceph-volume/">ceph-volume</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../releases/general/">Ceph 版本（总目录）</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../releases/">Ceph 版本（索引）</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../security/">Security</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../hardware-monitoring/">硬件监控</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../glossary/">Ceph 术语</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../jaegertracing/">Tracing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../translation_cn/">中文版翻译资源</a></li>
</ul>

            
          
        </div>
        
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="../../../">Ceph</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
<div id="dev-warning" class="admonition note">
  <p class="first admonition-title">Notice</p>
  <p class="last">This document is for a development version of Ceph.</p>
</div>
  <div id="docubetter" align="right" style="padding: 5px; font-weight: bold;">
    <a href="https://pad.ceph.com/p/Report_Documentation_Bugs">Report a Documentation Bug</a>
  </div>

  
  <section id="mds-quiesce-protocol">
<h1>MDS Quiesce Protocol<a class="headerlink" href="#mds-quiesce-protocol" title="Permalink to this heading"></a></h1>
<p>The MDS quiesce protocol is a mechanism for “quiescing” (quieting) a tree in a
file system, stopping all write (and sometimes incidentally read) I/O.</p>
<p>The purpose of this API is to prevent multiple clients from interleaving reads
and writes across an eventually consistent snapshot barrier where out-of-band
communication exists between clients. This communication can lead to clients
wrongly believing they’ve reached a checkpoint that is mutually recoverable to
via a snapshot.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This is documentation for the low-level mechanism in the MDS for
quiescing a tree of files. The higher-level QuiesceDb is the
intended API for clients to effect a quiesce.</p>
</div>
<section id="mechanism">
<h2>Mechanism<a class="headerlink" href="#mechanism" title="Permalink to this heading"></a></h2>
<p>The MDS quiesces I/O using a new <code class="docutils literal notranslate"><span class="pre">quiesce_path</span></code> internal request that obtains
appropriate locks on the root of a tree and then launches a series of
sub-requests for locking other inodes in the tree. The locks obtained will
force clients to release caps and in-progress client/MDS requests to complete.</p>
<p>The sub-requests launched are <code class="docutils literal notranslate"><span class="pre">quiesce_inode</span></code> internal requests. These will
obtain “cap-related” locks which control capability state, including the
<code class="docutils literal notranslate"><span class="pre">filelock</span></code>, <code class="docutils literal notranslate"><span class="pre">authlock</span></code>, <code class="docutils literal notranslate"><span class="pre">linklock</span></code>, and <code class="docutils literal notranslate"><span class="pre">xattrlock</span></code>. Additionally, the
new local lock <code class="docutils literal notranslate"><span class="pre">quiescelock</span></code> is acquired. More information on that lock in
the next section.</p>
<p>Locks that are not cap-related are skipped because they do not control typical
and durable metadata state. Additionally, only Capabilities can give a client
local control of a file’s metadata or data.</p>
<p>Once all locks have been acquired, the cap-related locks are released and the
<code class="docutils literal notranslate"><span class="pre">quiescelock</span></code> is relied on to prevent issuing Capabilities to clients for the
cap-related locks. This is controlled primarily by <code class="docutils literal notranslate"><span class="pre">CInode:get_caps_*</span></code>
methods. Releasing these locks is necessary to allow other ranks with the
replicated inode to quiesce without lock state transitions resulting in
deadlock. For example, a client wanting <code class="docutils literal notranslate"><span class="pre">Xx</span></code> on an inode will trigger a
<code class="docutils literal notranslate"><span class="pre">xattrlock</span></code> in <code class="docutils literal notranslate"><span class="pre">LOCK_SYNC</span></code> state to transition to <code class="docutils literal notranslate"><span class="pre">LOCK_SYNC_EXCL</span></code>.  That
state would not allow another rank to acquire <code class="docutils literal notranslate"><span class="pre">xattrlock</span></code> for reading,
thereby creating deadlock, subject to quiesce timeout/expiration. (Quiesce
cannot complete until all ranks quiesce the tree.)</p>
<p>Finally, if the inode is a directory, the <code class="docutils literal notranslate"><span class="pre">quiesce_inode</span></code> operation traverses
all directory fragments and issues new <code class="docutils literal notranslate"><span class="pre">quiesce_inode</span></code> requests for any child
inodes.</p>
</section>
<section id="inode-quiescelock">
<h2>Inode Quiescelock<a class="headerlink" href="#inode-quiescelock" title="Permalink to this heading"></a></h2>
<p>The <code class="docutils literal notranslate"><span class="pre">quiescelock</span></code> is a new local lock for inodes which supports quiescing
I/O.  It is a type of superlock where every client or MDS operation which
requires a wrlock or xlock on a “cap-related” inode lock will also implicitly
acquire a wrlock on the <code class="docutils literal notranslate"><span class="pre">quiescelock</span></code>.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>A local lock supports multiple writers and only one exclusive locker. No read locks.</p>
</div>
<p>During normal operation in the MDS, the <code class="docutils literal notranslate"><span class="pre">quiescelock</span></code> is never held except
for writing. However, when a subtree is quiesced, the <code class="docutils literal notranslate"><span class="pre">quiesce_inode</span></code>
internal operation will hold <code class="docutils literal notranslate"><span class="pre">quiescelock</span></code> exclusively for the entire
lifetime of the <code class="docutils literal notranslate"><span class="pre">quiesce_inode</span></code> operation. This will deny the <strong>new</strong>
acquisition of any other cap-related inode lock.  The <code class="docutils literal notranslate"><span class="pre">quiescelock</span></code> must be ordered
before all other locks (see <code class="docutils literal notranslate"><span class="pre">src/include/ceph_fs.h</span></code> for ordering) in order to
act as this superlock.</p>
<p>One primary reason for this <code class="docutils literal notranslate"><span class="pre">quiescelock</span></code> is to prevent a client request from
blocking on acquiring locks held by <code class="docutils literal notranslate"><span class="pre">quiesce_inode</span></code> (e.g. <code class="docutils literal notranslate"><span class="pre">filelock</span></code> or
<code class="docutils literal notranslate"><span class="pre">quiescelock</span></code>) while still holding locks obtained during normal path
traversal. Notably, the important locks are the <code class="docutils literal notranslate"><span class="pre">snaplock</span></code> and <code class="docutils literal notranslate"><span class="pre">policylock</span></code>
obtained via <code class="docutils literal notranslate"><span class="pre">Locker::try_rdlock_snap_layout</span></code> on all parents of the root
inode of the request (the <code class="docutils literal notranslate"><span class="pre">ino</span></code> in the <code class="docutils literal notranslate"><span class="pre">filepath</span></code> struct). If that
operation waits with those locks held, then a future <code class="docutils literal notranslate"><span class="pre">mksnap</span></code> on the root
inode will be impossible.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The <code class="docutils literal notranslate"><span class="pre">mksnap</span></code> RPC only acquires a wrlock (write lock) on the
<code class="docutils literal notranslate"><span class="pre">snaplock</span></code> for the inode to be snapshotted.</p>
</div>
<p>The way <code class="docutils literal notranslate"><span class="pre">quiescelock</span></code> helps prevent this is by being the first <strong>mandatory</strong>
lock acquired when acquiring a wrlock or xlock on a cap-related lock.
Additionally, there is also special handling when it cannot be acquired: all
locks held by the operation are dropped and the operation waits for the
<code class="docutils literal notranslate"><span class="pre">quiescelock</span></code> to be available. The lock is mandatory in that a call to
<code class="docutils literal notranslate"><span class="pre">Locker::acquire_locks</span></code> with a wrlock/xlock on a cap-related lock  will
automatically include (add) the <code class="docutils literal notranslate"><span class="pre">quiescelock</span></code>.</p>
<p>So, the expected normal flow is that an operation like <code class="docutils literal notranslate"><span class="pre">mkdir</span></code> will perform
its path traversal, acquiring parent and dentry locks, then attempt to acquire
locks on the parent inode necessary for the creation of a dentry. The operation
will fail to acquire a wrlock on the automatically included <code class="docutils literal notranslate"><span class="pre">quiescelock</span></code>,
add itself to the <code class="docutils literal notranslate"><span class="pre">quiescelock</span></code> wait list, and then drop all held locks.</p>
</section>
<section id="lookups-and-exports">
<h2>Lookups and Exports<a class="headerlink" href="#lookups-and-exports" title="Permalink to this heading"></a></h2>
<p>Quiescing a tree results in a number of <code class="docutils literal notranslate"><span class="pre">quiesce_inode</span></code> operations for each
inode under the tree. Those operations have a shared lifetime tied to the
parent <code class="docutils literal notranslate"><span class="pre">quiesce_path</span></code> operation. So, once operations complete quiesce (but do
not finish and release locks), the operations sit with locks held and do not
monitor the state of the tree. This means we need to handle cases where new
metadata is imported.</p>
<p>If an inode is fetched via a directory <code class="docutils literal notranslate"><span class="pre">lookup</span></code> or <code class="docutils literal notranslate"><span class="pre">readdir</span></code>, the MDS will
check if its parent is quiesced (i.e. is the parent directory <code class="docutils literal notranslate"><span class="pre">quiescelock</span></code>
xlocked?). If so, the MDS will immediately issue an dispatch a
<code class="docutils literal notranslate"><span class="pre">quiesce_inode</span></code> operation for that inode. Because it’s a fresh inode, the
operation will immediately succeed and prevent the client from being issued
inappropriate capabailities.</p>
<p>The second case is handling subtree imports from another rank. This is
problematic since the subtree import may have inodes with inappropriate state
that would invalidate the guarantees of the reportedly “quiesced” tree. To
avoid this, importer MDS will skip discovery of the root inode for an import if
it encounters a directory inode that is quiesced. If skipped, the rank
will send a NAK message back to the exporter which will abort the export.</p>
</section>
</section>



<div id="support-the-ceph-foundation" class="admonition note">
  <p class="first admonition-title">Brought to you by the Ceph Foundation</p>
  <p class="last">The Ceph Documentation is a community resource funded and hosted by the non-profit <a href="https://ceph.io/en/foundation/">Ceph Foundation</a>. If you would like to support this and our other efforts, please consider <a href="https://ceph.io/en/foundation/join/">joining now</a>.</p>
</div>


           </div>
           
          </div>
          <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
        <a href="../locking/" class="btn btn-neutral float-left" title="Ceph MDS Locker" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
        <a href="../../radosgw/" class="btn btn-neutral float-right" title="RADOS 网关开发者文档" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
    </div>

  <hr/>

  <div role="contentinfo">
    <p>&#169; Copyright 2016, Ceph authors and contributors. Licensed under Creative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0).</p>
  </div>

   

</footer>
        </div>
      </div>

    </section>

  </div>
  

  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>